import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../components/Home.vue'
import Login from '../components/Login.vue'
import User from '../components/User.vue'
import Show from '../view/Show.vue'
import About from '../view/About.vue'
import Oper from '../view/Oper.vue'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    { path: '/', component: Show },
    { path: '/about', component: About },
    { path: '/oper', component: Oper },
    { path: '/admin', component: Login },
    {
      path: '/Home',
      component: Home,
      redirect: '/user',
      children: [
        { path: '/user', component: User }
      ]
    }
  ]
})

export default router
